This repository was archived by the owner on Jan 19, 2026. It is now read-only.
fix(types): update path resolution and improve type extraction for Storyblok types#208
Merged
alvarosabu merged 1 commit intoMay 27, 2025
Conversation
… Storyblok types - Updated the path resolution for the Storyblok types file to use __dirname for better reliability. - Simplified the type extraction process by directly using the content of the storyblokTypesContent instead of manually collecting type definitions. - Ensured that the schema handling is more robust by adding a fallback for component.schema.
alvarosabu
added a commit
that referenced
this pull request
Jun 19, 2025
* chore: fix lint
* chore: fix lint
* feat: separate-files option
* feat!: `.storyblok` directory encapsulation as default path
BREAKING CHANGE: Generated files will no longer be saved on the root of the project by default, they will be encapsulated inside of a `.storyblok` folder.
* feat!: generated files naming syntax convention
BREAKING CHANGE: generated file naming syntax is now standard between all the commands, following the structure `<filename>.<suffix>.json`. Both filename and suffix are customizable and by default would be the command name and the spaceId respectively. Ex: `components.12345.json`
* feat: remove strict write permission for generated files
* feat: remove unnecesary check on save files since recursive mkdir is used.
* feat: change argument syntax for suffix
* feat: remove again strict permissions for filesystem
* feat: suffix command and new file organization for pull-components
* feat: add pull as as subcommand
* feat: components presets
* feat: pass space data as an object to the save components to files action
* feat: move interfaces to constants
* feat: replace netrc with json
* feat: simplify file saving logic by removing nested structure and making suffix optional
* feat: update resolved path for saving components to include space directory inside
* fix: clean linter
* feat: updated tests to remove netrc
* refactor: replace ofetch with customFetch and improve error handling
- Removed the ofetch dependency from multiple files and replaced it with a customFetch utility for better error handling and flexibility.
- Updated API calls in login, pull languages, and user actions to use the new fetch method.
- Introduced a new ResponseError interface for improved error management.
- Added a getStoryblokUrl utility function to centralize URL construction based on region.
- Enhanced error handling in API error management to accommodate the new FetchError class.
* chore: update lock
* feat: simplified fetch wrapper and enhance type safety
- Updated `NetrcMachine` and `SessionState` interfaces to use `RegionCode` for improved type safety.
- Refactored login actions to handle optional chaining for better error handling.
- Enhanced API calls to utilize the new `customFetch` utility with improved type definitions.
- Added tests for `customFetch` to ensure robust error handling and response management.
* chore: delete unused path
* feat: refactor credential management to handle non-existent files and update session handling
- Updated `getCredentials` to create a credentials file if it does not exist, returning an empty object.
- Changed `removeCredentials` to accept a region code instead of a machine name, using the region to determine the machine name.
- Refactored `persistCredentials` to use region code directly.
- Updated tests to reflect changes in credential management and session handling.
* chore: remove leftover console.log
* chore: remove leftovers of netrc
* feat: re-structured language command with sub commands
- Changed command name from `pull-languages` to `languages` across the codebase for consistency and add sub command 'pull'
- Updated resolved path to `.storyblok/languages/spaceId/filename.suffix.json` by default
- Updated launch configuration to reflect the new command name.
- Introduced new actions and constants for managing languages, including fetching and saving language data.
- Added tests for the new languages command and its actions.
- Removed obsolete `pull-languages` command and its associated tests.
* feat: update saveComponentsToFiles function and related tests
- Updated actions to use customFetch instead of ofetch
- Modified the `saveComponentsToFiles` function to accept a structured `spaceData` object containing components, groups, and presets, instead of separate parameters.
- Updated the default filename behavior to save as `components.json` instead of including the space ID in the filename.
- Enhanced test cases to reflect changes in the function signature and filename generation logic.
- Removed unused imports and interfaces to streamline the codebase.
* chore: remove block command implementation and clean up imports
- Deleted the entire block command implementation from the codebase.
- Removed unused imports related to the block command in the components test file.
* feat: add alias for languages command
- Introduced an alias 'lang' for the 'languages' command to enhance usability and streamline command input.
* feat: add fetchComponent function and update components command to support fetching individual components
- Introduced a new `fetchComponent` function to retrieve a specific component by name.
- Updated the `componentsCommand` to allow pulling a single component by name, enhancing the command's functionality.
- Modified tests to cover the new component fetching feature, including scenarios for successful retrieval and handling of non-existent components.
- Adjusted the structure of the command's output to reflect the new functionality, ensuring clarity in success messages.
* refactor: remove unused ComponentsSaveOptions interface and clean up SaveComponentsOptions
- Deleted the `ComponentsSaveOptions` interface as it was no longer needed.
- Removed the `space` property from the `SaveComponentsOptions` interface to simplify its structure.
- This cleanup enhances code maintainability and reduces complexity in the components command.
* feat: adapt readComponentsFiles with filters to new directory structure
* feat: classy minimal spinner
* Update src/commands/components/index.ts
Co-authored-by: Edoardo Dusi <edo@edoardodusi.com>
* chore: remove delay from actions
* chore: remove import for linter
* chore: wip push
* Update src/commands/components/index.ts
Co-authored-by: Edoardo Dusi <edo@edoardodusi.com>
* chore(tests): updated success messages in components command to use "to" instead of "in"
* fix: update COMPONENTS color in constants and enhance components command with loading spinners
- Changed COMPONENTS color from '#FF5722' to '#a185ff' in src/constants.ts for better visual consistency.
- Added loading spinners to the components command in src/commands/components/index.ts to improve user experience during data fetching operations.
- Each data fetching step now provides visual feedback, enhancing the command's interactivity.
* feat: sequential async operations with spinner output
* feat: spinner async list for pushing components
- Added `@topcli/spinner` to implement async list of tasks
- Extended error handling support for multiple operations and complex message stacks
* feat: add warning for empty component list during push
- Implemented warning message when no components match filter criteria
- Added specific message for separate files scenario
- Temporarily replaced `pushComponent` with `fakePushComponent` for testing
* feat: add support for component internal tags
- Implemented new actions for fetching and pushing component internal tags
- Updated SpaceData and SpaceComponent interfaces to include internal tags
- Enhanced component push process to handle internal tag synchronization
- Added filesystem support for saving and reading internal tags
- Updated error handling for new internal tag operations
* feat: enhance component push with upsert and tag synchronization
- Added `upsertComponent` and `upsertComponentInternalTag` methods to handle component creation/update
- Improved component push process to handle existing components and internal tags
- Updated error handling to manage component name conflicts
- Added new API error actions for update operations
- Refined component push command to process internal tags sequentially
* refactor: simplify component command state handling
- Destructured `password` and `region` from state at the beginning of methods
* feat: add retry mechanism to custom fetch utility
- Implemented exponential backoff retry strategy for network requests
- Added configurable max retries and base delay options
- Improved error handling for rate limit and network errors
- Created a delay utility function to support retry mechanism
* refactor: improve code readability with explicit conditionals and formatting
- Simplified and clarified conditional logic in component file reading functions
- Added explicit continue statements and improved code formatting
- Removed unused imports in components index file
- Refined conditional checks in custom fetch utility
* feat: enhance component push with comprehensive resource synchronization
- Added support for pushing component groups, presets, and internal tags
- Implemented upsert methods for component groups and presets
- Improved error handling for resource conflicts and name collisions
- Added recursive property removal utility for clean preset updates
- Updated component push command to handle consolidated and separate file scenarios
- Enhanced error messaging and spinner feedback for different resource types
* refactor: restructure components module with modular architecture
- Split components module into separate pull, push, and core files
- Created dedicated directories for pull and push actions
- Moved constants, actions, and command implementations to respective modules
- Simplified index file to export core functionality
- Improved code organization and separation of concerns
- Maintained existing functionality while enhancing code structure
* refactor: update error handling and test cases for API interactions
- Improved error handling in various API interaction methods
- Updated test cases to use new `APIError` and `FetchError` classes
- Enhanced error messages with more context and specificity
- Skipped a problematic test case in languages actions
- Standardized error handling across different commands
* refactor: standardize code style with semicolons and minor formatting
- Added missing semicolons across multiple files
- Cleaned up import and export statements
- Improved code consistency by applying uniform formatting
- Removed unnecessary comments and whitespace
- Ensured consistent code style across TypeScript files
* test: standardize user actions test file formatting
- Applied consistent code style with semicolons
- Cleaned up import statements
- Improved code formatting and readability
- Maintained existing test logic and coverage
* refactor: fix all failing test from latest merge next
- replace ora spinner with @topcli/spinner across multiple commands
- Updated login, user, languages, and components commands to use @topcli/spinner
- Added isVitest flag to conditionally disable spinner in test environments
- Removed ora dependency from package.json
- Standardized spinner initialization and usage across different commands
- Improved spinner configuration with verbose option
* refactor: standardize code formatting and semicolon usage in test files
- Applied consistent code style with semicolons across multiple test files
- Cleaned up import and export statements
- Improved code formatting and readability
- Maintained existing test logic and coverage
- Ensured uniform code style in TypeScript test files
* refactor: modularize component push operations and simplify code structure
- Extracted tag handling logic into a separate `operations.ts` file
- Commented out complex component and preset pushing code for future refinement
- Replaced direct `program` import with `getProgram()` singleton method
- Simplified push command by extracting tag handling to a dedicated function
- Removed unused imports and simplified code structure
* test: add comprehensive test suite for component push actions
- Created test file for component push actions with mock server
- Implemented tests for pushing, updating, and upserting components, groups, presets, and internal tags
- Added test cases for successful API interactions and error handling
- Utilized MSW for mocking HTTP requests and responses
- Covered various scenarios including valid and invalid token authentication
- Tested readComponentsFiles function with consolidated and separate file structures
* test: add unit tests for component push tag handling operations
- Created comprehensive test suite for `handleTags` function in push operations
- Implemented test cases for successful and failed tag processing
- Mocked external dependencies like spinner and actions module
- Verified correct behavior of tag upsert with different scenarios
* feat: implement hierarchical component group handling in push command
- Added `handleComponentGroups` function to process component groups with parent-child relationships
- Implemented recursive group processing with UUID and ID mapping
- Updated type definitions to support nullable parent references
- Created comprehensive unit tests for group handling with various scenarios
- Improved error handling and spinner feedback during group upsert operations
* feat: implement component processing with group and tag mapping in push command for consolidated files
- Added `handleComponents` function to process components with mapped group UUIDs and tag IDs
- Implemented comprehensive component and preset upsert logic
- Enhanced error handling and spinner feedback during component processing
- Created unit tests covering various component push scenarios
- Integrated group and tag mapping into component push workflow
* feat: enhance component push filtering with pattern and component-specific filtering
- Added new filtering functions `filterSpaceDataByPattern` and `filterSpaceDataByComponent`
- Implemented flexible filtering for components using wildcard patterns and exact component names
- Updated push command to support filtering components by name or pattern
- Added comprehensive unit tests for new filtering functionality
- Improved component processing with intelligent resource mapping
- Updated VSCode launch configurations to support new filtering options
* refactor: clean up imports and simplify type references in push operations
- Removed unused type imports in operations test file
- Simplified import statements for component-related types
- Improved code readability by removing unnecessary type references
* feat: enhance component pull/push command with improved path handling and file structure
- Updated pull command to maintain consistent `components/{spaceId}` folder structure
- Improved path resolution for custom and default file paths
- Added README.md with comprehensive documentation for component pull and push commands
- Enhanced file path generation for separate and consolidated file modes
- Ensured consistent file output regardless of custom path configuration
- Updated related utility functions to support more flexible path handling
* refactor: remove unused `parse` import from path module in push actions
* refactor: update languages command file structure and testing
- Modified languages test to save files in a space-specific directory
- Removed unnecessary console log in languages command index
- Updated file path for consolidated languages file output
* test: fix filesystem path resolution test cases
- Updated test cases for `resolvePath` function to correctly handle path and folder arguments
- Ensured proper path resolution for both specified and default paths
- Corrected expected path resolution in test assertions
* test: update component pull actions test cases with improved path handling
- Modified test cases to use space-specific directory structure for component files
- Updated file path resolution in saveComponentsToFiles tests
- Ensured consistent file output across different test scenarios
- Refactored test setup to align with recent path handling improvements
* test: update readComponentsFiles test cases with improved error handling and path resolution
- Modified test cases to use dynamic space-specific paths
- Updated error assertion for file not found scenarios
- Enhanced error object validation with more detailed error information
- Refactored test setup to improve path flexibility and error handling
* test: update component push operations test with refined component processing logic
- Modified test cases to reflect updated component upsert behavior
- Removed schema field from mock component data
- Added mock component groups to test data
- Updated test expectations for component and preset processing
- Adjusted test assertions for component upsert calls and error handling
* test: refine component push operations test cases with updated whitelist and dependency handling
- Updated test scenarios for component group whitelisting
- Modified test expectations for circular dependency detection
- Adjusted test assertions for missing dependencies handling
- Simplified component processing test steps
* feat: add migrations command with generate functionality
- Introduced new migrations command with generate subcommand
- Added constants for migrations command and color palette
- Implemented migration file generation for specific component fields
- Created actions and tests for migration file creation
- Updated index to import migrations command and related modules
* test: re-enable and update component pull command test cases
- Uncommented and fixed test cases for component pull command
- Updated test scenarios for fetching single and multiple components
- Added tests for error handling and path configuration options
- Corrected import and function references in test file
- Ensured comprehensive coverage of pull command functionality
* refactor: simplified `handleComponents` whitelist params and added initial tests for push command
* test: add test cases for component push with group and component whitelists
- Added test case for pushing components with group whitelist
- Added test case for pushing components with component whitelist
- Updated test scenarios to validate component filtering based on whitelist conditions
- Expanded test coverage for component push command with different restriction types
* test: add support for component name and filter flags in push command
- Implemented test cases for pushing specific components by name
- Added test scenarios for filtering components using wildcard patterns
- Introduced new filtering functions `filterSpaceDataByComponent` and `filterSpaceDataByPattern`
- Expanded test coverage for component push command with name and filter options
* test: clean up unnecessary logging and spy in push command test
- Removed console log statements from push command test
- Simplified test setup by removing unnecessary spy and mock logging
- Maintained core test logic for validating component push workflow
* refactor: remove debug logging and optimize import order in push and migrations commands
* refactor: remove debug logging in push command
- Deleted unnecessary console.log statement in handleComponents method
- Cleaned up verbose logging of internal state during component processing
* test: remove debug logging from push command test
* test: enhance migrations generate command test coverage
- Added comprehensive test cases for migrations generate command
- Implemented tests for successful migration generation with and without custom path
- Added error handling tests for missing component name, field, and non-existent components
- Updated test file to improve error checking and mock session state
* docs: add comprehensive README for migrations generate command
- Created detailed documentation for migrations generate command
- Included usage examples, command options, and output structure
- Added manual testing checklist and best practices
- Provided insights into migration file generation and usage scenarios
* feat: add optional suffix for migration file generation
- Enhanced migration generation to support optional file name suffix
- Updated `generateMigration` function to accept optional suffix parameter
- Modified command options to include `--suffix` flag
- Updated README with new suffix generation example and documentation
- Adjusted file name generation logic to incorporate optional suffix
* test: update migration generation tests to support optional suffix parameter
- Modified test cases to include optional suffix parameter in `generateMigration` function calls
- Ensured test coverage reflects the recent enhancement of migration file generation
* refactor: improve error handling and file reading in components push command
- Refactored `readComponentsFiles` to use a more robust file reading approach
- Added detailed error messaging for non-existing space directories
- Implemented a generic `readJsonFile` utility function for consistent file parsing
- Enhanced error handling for component file reading scenarios
- Updated error messages to provide clearer guidance for users
* refactor: remove unused CommandError import in push command
- Removed unnecessary CommandError import from actions.ts
- Cleaned up unused import in actions.test.ts
- Simplified error handling imports
* feat: add validation for component name in push operation
- Added a check to ensure component has a name before processing
- Implemented a delay and spinner failure for components without a name
- Improved error handling for missing component name scenario
* fix: filter internal tags to include only component tags
- Ensured only tags with `object_type` of 'component' saved
* chore: remove duplicate comment line in component preset actions
* refactor: removed field option
- Removed required field parameter from migration generation
- Updated migration template with more generic examples
- Simplified file naming convention for migration files
- Removed unnecessary field-specific logic from generate command
- Updated tests to reflect new migration generation approach
* feat: fetch stories action method
- Created comand-less story module
- Implemented `objectToStringParams` utility function in `utils/index.ts`
- Converts object values to strings for use with URLSearchParams
* refactor: extract glob pattern to regex utility function
- Created `createRegexFromGlob` utility function in `utils/index.ts`
- Moved regex creation logic from `filterSpaceDataByPattern` to new utility function
- Simplified pattern matching with a reusable glob-to-regex conversion method
* feat: add migrations run command with comprehensive story migration support
- Implemented new migrations run command with advanced migration processing
- Added support for running migrations on specific components or entire spaces
- Created utility functions for reading and applying migration files
- Introduced dynamic migration function loading and content transformation
- Implemented dry-run mode and detailed migration result reporting
- Added new actions for fetching and updating stories
- Enhanced error handling and logging for migration operations
* refactor: improve migration run command with component filtering and spinner management
- Added filtering of migrations based on component name
- Optimized spinner usage and logging for migration operations
- Simplified migration processing logic
- Enhanced error handling and migration result tracking
- Moved spinner initialization to more precise locations in the code
* refactor: improve code formatting and documentation
- Enhanced code readability by adding multi-line conditionals in migration and utility files
- Updated JSDoc comments in `operations.ts` with more detailed parameter descriptions
- Refined logging output formatting in migration result summary
- Minor improvements to code structure and error reporting
* fix: storyblok stories actions test suite
- Updated MSW handlers to use dynamic space ID and simplified mock logic
- Improved error handling and test coverage for fetchStories method
- Removed redundant handler and consolidated API mocking
- Updated test cases to handle async errors more robustly
- Simplified error catching and assertion in test scenarios
- Removed unnecessary return statement in updateStory action
* test: add comprehensive test suite for migration file reading actions
- Created test file for migration file reading actions
- Added test cases for `readJavascriptFile` method covering successful reads, error scenarios, and file validation
- Implemented tests for `readMigrationFiles` method with various scenarios including file filtering, empty directories, and error handling
- Used memfs for virtual file system testing to simulate different file system conditions
* test: add comprehensive test suite for migration function loading
- Implemented tests for `getMigrationFunction` method
- Added test cases covering successful migration function loading
- Tested scenarios for missing default exports and non-existent files
- Used memfs and vi.doMock for simulating dynamic module imports
- Ensured robust error handling and function validation
* test: add comprehensive test suite for migrations run command
- Implemented detailed test suite for migrations run command
- Added test cases for running migrations with and without component filtering
- Mocked session, stories actions, and migration operations
- Verified correct method calls and migration processing logic
- Ensured comprehensive coverage of migration run scenarios
* test: enhance migrations run command test coverage
- Added comprehensive test cases for migrations run command
- Implemented tests for migration filtering, dry run mode, and handling of migration results
- Verified correct behavior when no stories are modified
- Added mock scenarios for different migration outcomes
- Expanded test suite to cover edge cases in migration processing
* feat: add query filter support for migrations run command
- Introduced new `--query` option for filtering stories using Storyblok filter query syntax
- Updated `MigrationsRunOptions` interface to include optional query parameter
- Modified `fetchStoriesByComponent` method to handle filter query parameters
- Added CLI option for query-based story filtering in migrations run command
- Enhanced `fetchStories` method to support complex filter query parsing
- Updated `StoriesQueryParams` interface to allow flexible filter query handling
* docs: update migration generate command documentation
- Removed field-specific references in README
- Updated command usage examples to reflect component-level migration generation
- Simplified file naming conventions in documentation
- Updated manual testing checklist and best practices to align with new approach
- Clarified command options and output structure without field-specific details
* test: update test cases for stories and migrations run command
- Modified test cases in `migrations/run/index.test.ts` to accommodate new `fetchStoriesByComponent` method signature
- Updated `stories/actions.test.ts` to expect two stories instead of one in a specific test scenario
- Adjusted method call expectations to include optional parameters
- Ensured test coverage reflects recent changes in method signatures
* feat: add starts-with filter support for migrations run command
- Introduced new `--starts-with` option for filtering stories by path
- Updated `MigrationsRunOptions` interface to include optional `startsWith` parameter
- Modified `fetchStoriesByComponent` method to handle `starts_with` filter
- Enhanced `StoriesFilterOptions` interface to support path-based filtering
- Added CLI option for path-based story filtering in migrations run command
- Updated test cases to cover new `starts-with` filter functionality
- Improved logging to display applied filters in story fetching process
* refactor: remove unused `storyModified` variable in migrations run operations
- Deleted unnecessary `storyModified` variable that was not being used
- Simplified code by removing redundant variable declaration
- Maintained existing logic for migration content processing
* feat: add publish option for migrations run command
- Introduced new `--publish` option with modes: 'all', 'published', and 'published-with-changes'
- Updated `MigrationsRunOptions` interface to include optional `publish` parameter
- Added utility functions `isStoryPublishedWithoutChanges` and `isStoryWithUnpublishedChanges`
- Modified `updateStory` action to support optional publish flag
- Enhanced migration run command to handle different publication scenarios
- Updated test cases to cover new publish option functionality
- Improved story update logic with flexible publishing options
* docs: add comprehensive testing checklist for migrations run command
- Created detailed README.md for migrations run command
- Documented test scenarios for various command options and behaviors
- Included examples of command usage with different flags
- Provided notes on migration file structure and best practices
- Outlined comprehensive testing requirements for command functionality
* refactor: clean up imports and improve updateStory function documentation
- Removed unused imports from `index.test.ts`
- Enhanced JSDoc for `updateStory` function in `actions.ts`
- Removed unused `StoryContent` type import
- Clarified parameters and added more descriptive documentation for story update method
* fix: improved error handling and spinner failed state
* feat: enhance migration run processing with rollback support
- Added `saveRollbackData` function to capture original states of stories before modifications.
- Improved error handling for migration function loading failures, ensuring all stories are marked as failed if the migration function cannot be loaded.
- Refactored story processing logic to filter out stories without content and ensure valid stories are processed for each migration file.
- Enhanced comments for clarity on the migration process and rollback functionality.
* feat: implement rollback functionality for migrations
- Added `rollback` command to support rolling back migrations.
- Introduced `restoreFromRollback` function to restore stories from rollback files.
- Enhanced error handling and user feedback during the rollback process.
- Updated migration index to include rollback actions and constants.
* chore: add unit tests for rollback functionality and refactor actions
- Introduced unit tests for `saveRollbackData` and `readRollbackFile` functions to ensure correct behavior during rollback operations.
- Refactored `restoreFromRollback` to `readRollbackFile` for clarity and improved error handling.
- Enhanced the rollback command to read rollback data and restore stories, including handling various edge cases.
- Updated test cases to cover scenarios such as successful rollbacks, error handling, and directory creation.
* docs: add README for rollback command testing checklist
- Created a comprehensive README.md for the `rollback` command, outlining a detailed testing checklist.
- Included sections on general requirements, required arguments, error handling, options, rollback process, examples, and file structure.
- Documented the expected behavior and error messages for various scenarios to ensure clarity during testing.
* fix: correct JSON structure in VSCode launch configuration
- Fixed the JSON structure in `.vscode/launch.json` by properly closing the `env` object and ensuring correct formatting for the subsequent configuration object.
- This change enhances the clarity and functionality of the launch configuration for debugging migrations.
* fix: improve rollback file reading and story content handling
- Updated the `readRollbackFile` function to ensure the correct file path is used by appending `.json` if not already present, enhancing robustness in file reading.
- Refactored the `handleMigrations` function to utilize `structuredClone` for creating a deep copy of the story content, improving performance and avoiding potential issues with JSON serialization.
* feat: add utility functions for string formatting and object manipulation
- Introduced new utility functions in `format.ts` for converting strings to PascalCase, CamelCase, and SnakeCase.
- Added functions for masking tokens, slugifying text, and recursively removing properties from objects.
- Implemented a method to convert objects to string parameters for URLSearchParams.
- Created a function to generate regex patterns from glob patterns.
- Updated `index.ts` to export the new formatting utilities.
* fix: component presets filename should be pluralized
* feat: base types generation cmd
* feat: strict mode to disable compiler.additionalProperties loose typing
* feat: generate shared storyblok property types d.ts
* feat: generate d.ts with storyblok special field types
- Refactored the type generation logic to improve handling of component types, including sanitization of component names.
- Introduced a new `ComponentPropertySchema` interface and related types in `schemas.ts` for better type safety and organization.
- Updated the `generateStoryblokTypes` function to read type definitions from an external file, ensuring a more robust extraction process.
- Removed redundant type definitions from `storyblok.ts` to streamline the codebase and avoid duplication.
* feat: blok fields type generation
- Added support for component restrictions based on groups and individual whitelists in `getComponentPropertiesTypeAnnotations`.
- Introduced a new parameter `componentsMaps` to facilitate the mapping of component groups and names.
- Updated the `generateTypes` function to pass the new `componentsMaps` parameter, improving type safety and flexibility in handling component properties.
* feat: enhance type generation with space data integration
- Updated `generateTypes` and `getComponentPropertiesTypeAnnotations` functions to utilize `spaceData` instead of `componentsMaps`, improving type safety and flexibility.
- Added null checks for `spaceData.components` to prevent runtime errors.
- Removed the redundant `generateComponentGroupsAndComponentNames` function to streamline the codebase.
- Improved error handling in the `generateTypes` function by implementing a try/catch block to manage asynchronous errors effectively.
* feat: added type prefix flag
- Refactored `GenerateTypesOptions` to replace `typeNamesPrefix` and `typeNamesSuffix` with a single `typePrefix` option for improved clarity and usability.
- Enhanced `getComponentType` function to utilize the new `typePrefix` option, simplifying the type name generation process.
- Updated command options in `index.ts` to include `--type-prefix` for better user experience when generating component types.
- Adjusted handling of Storyblok property types to ensure consistent type generation without unnecessary prefixes.
* chore: add debug configuration for generating types from separate files
- Introduced a new launch configuration in `.vscode/launch.json` for debugging the type generation process with separate files.
- This configuration allows for easier debugging of the type generation command, enhancing the development experience.
* refactor: simplify generate command options
- Removed the optional `[componentName]` parameter from the `generate` command to streamline the command usage.
- Eliminated the `--fi, --filter <filter>` option to reduce complexity in type generation, focusing on essential flags for better clarity and usability.
* fix: add suffix support for component reading and pushing
- Introduced a new `suffix` option in the `readComponentsFiles` function to allow reading components with specific suffixes from both consolidated and separate files.
- Updated the VSCode launch configuration to include new debugging options for pushing components with and without suffixes.
- Enhanced unit tests to cover scenarios for reading components with suffixes, ensuring robust functionality and validation of the new feature.
* fix: update suffix parameter in readConsolidatedFiles function
- Modified the `readConsolidatedFiles` function to make the `suffix` parameter optional, enhancing flexibility in reading consolidated files.
- This change aligns with the recent updates to support suffixes in component reading and pushing.
* feat: enhance type generation command with suffix support
- Added a new `suffix` option to the `GenerateTypesOptions` interface to allow for suffix customization during type generation.
- Updated the `generate` command in `index.ts` to utilize the new `suffix` option, improving flexibility in type generation.
- Modified the VSCode launch configuration to include a new debug option for generating types with a specified suffix, enhancing the development experience.
* feat: implement custom fields parser for type generation
- Added a new `customFieldsParser` option to the `GenerateTypesOptions` interface, allowing for custom field type handling during type generation.
- Introduced a `custom-fields-parser.ts` file to define the structure for the 'native-color-picker' field type.
- Updated the `getComponentPropertiesTypeAnnotations` function to utilize the custom fields parser when available, enhancing flexibility in type generation.
- Enhanced the `generate` command in `index.ts` to support the new `--custom-fields-parser` option for specifying the parser file path.
- Modified the VSCode launch configuration to include a debug option for generating types with a custom fields parser, improving the development experience.
* feat: add compiler options support for type generation
- Introduced a new `compilerOptions` option in the `GenerateTypesOptions` interface to allow for custom compiler configurations during type generation.
- Implemented a `compiler-options.ts` file to define default compiler settings.
- Updated the `generateTypes` function to load and apply compiler options when generating types, enhancing flexibility and customization.
- Enhanced the `getComponentPropertiesTypeAnnotations` function to support the new `customFieldsParser` type definition.
- Modified the VSCode launch configuration to include a debug option for generating types with specified compiler options, improving the development experience.
* test: add comprehensive tests for type generation actions
- Introduced a new test file `actions.test.ts` to validate the functionality of type generation actions.
- Implemented tests for `generateTypes` and `getComponentType` functions, covering various scenarios including strict mode, custom fields parser, and component property type annotations.
- Mocked necessary modules and created a virtual file system to simulate file operations, ensuring isolated and reliable tests.
- Enhanced test coverage for handling different property types such as text, textarea, number, boolean, multilink, and custom types.
- Verified that generated types align with expected outputs, improving the robustness of the type generation feature.
* test: add unit tests for type generation command
- Introduced a new test file `index.test.ts` to validate the functionality of the type generation command.
- Implemented tests for various scenarios including successful type generation, strict mode, type prefix, suffix, separate files, custom fields parser, and compiler options.
- Mocked necessary modules and created a controlled environment to ensure isolated and reliable tests.
- Enhanced test coverage for different command options, improving the robustness of the type generation feature.
* fix: remove unused import in type generation test
- Removed the unused `CommandError` import from `index.test.ts` to clean up the code and improve readability.
- This change helps maintain a tidy codebase by eliminating unnecessary dependencies.
* fix: added spinnesr fail on try catch error handler
* feat: add GitHub Actions workflow for publishing commits
- Introduced a new workflow `pkg.pr.new.yml` to automate the publishing of commits on push events.
- The workflow includes steps for checking out the code, setting up Node.js, installing dependencies with pnpm, building the project, and publishing using `pkg-pr-new`.
- This enhancement streamlines the deployment process and ensures that all commits are published efficiently.
* docs: update README and add Type Generation Command documentation
- Enhanced the README with a new section on features, improving clarity on the capabilities of the Storyblok CLI.
- Added a comprehensive documentation file for the Type Generation Command, detailing prerequisites, usage examples, architecture, and testing strategies to ensure type safety in Storyblok components.
- Improved visual elements in the README, including badge colors and layout adjustments for better readability.
* docs: clean up README formatting and improve readability
- Removed unnecessary blank lines and adjusted formatting in the main README and the Type Generation Command documentation to enhance clarity and consistency.
- Ensured proper alignment of bullet points for better visual presentation.
* docs: Update src/commands/types/generate/README.md
Co-authored-by: Edoardo Dusi <edo@edoardodusi.com>
* docs: Update src/commands/types/generate/README.md
Co-authored-by: Edoardo Dusi <edo@edoardodusi.com>
* docs: fix formatting in Type Generation Command section of README.md
- Removed unnecessary hyphen from the `generateTypes()` function reference to ensure consistency in formatting.
- This change improves the clarity of the documentation for users referencing the Type Generation Command.
* chore: remove outdated README files for components and migrations
- Deleted README.md files for components push, pull, and migrations generate/rollback commands as they are no longer relevant to the current project structure.
- This cleanup helps maintain a more organized and up-to-date documentation set.
* fix(login): improved spinner error handling
* chore: update package dependencies and versions
* feat(login, logout): enhance user feedback and add logout command styling
- Updated login success messages to include user-friendly greetings with the user's friendly name.
- Improved logout command feedback with a styled message and added line breaks for better readability.
- Introduced a new LOGOUT constant in the color palette for consistent styling across commands.
- Commented out a previous log statement in the credentials file for cleaner output.
* chore: change import order
* fix(languages): improve spinner handling and feedback during language fetching
- Moved spinner initialization outside of the try block for better error handling.
- Added spinner failure indication on error and ensured consistent logging of success messages.
- Included line breaks for improved readability in console output.
* fix(languages): update success message logging to include additional parameter
- Added a new mock function for `br` in the test setup to enhance logging capabilities.
- Updated success message assertions to include a second parameter for improved feedback consistency in the console output.
* fix(user): enhance spinner handling and logging feedback
- Moved spinner initialization outside of the try block for improved error handling.
- Updated success message logging to include an additional parameter for better console output consistency.
- Added a line break after the user command execution for improved readability in console output.
- Introduced spinner failure indication on error to enhance user feedback during the fetching process.
* fix(types): enhance success message logging and spinner handling
* fix(logging): enhance console output readability with line breaks
- Added line breaks to success and error messages in the pull and generate commands for improved readability in console output.
- Updated error messages to ensure consistent formatting across the application.
* docs: v4 beta internal docs
- Updated the main README to indicate that official documentation for package v4 is not yet available, directing users to the internal documentation for the v4 beta.
- Created a new README file in the src directory to provide detailed installation instructions and command references for the Storyblok CLI package.
- Added a comprehensive guide for the `login` command, including usage examples and options.
* docs(logout): add README for logout command
- Created a new README file for the `logout` command, detailing its usage, functionality, and examples.
- Included information on credential removal, session clearing, and warnings for already logged-out users.
- Aimed to enhance user understanding and provide clear instructions for the logout process.
* docs(languages): add README for languages command
- Created a new README file for the `languages` command, detailing its usage, options, and examples for pulling language configurations from a Storyblok space.
- Included information on file structure and notes for user requirements, enhancing clarity and usability for developers interacting with the command.
* docs(user): add README for user command
- Created a new README file for the `user` command, detailing its usage, functionality, and examples for viewing user information in Storyblok.
- Updated the main README to include a reference to the new `user` command, enhancing clarity and usability for developers interacting with the CLI.
- Aimed to provide comprehensive guidance for users to understand and utilize the command effectively.
* docs(README): update command reference and add global options section
- Updated the Command Reference section in the README to improve clarity and organization.
- Added a new Global Options section detailing options available for all commands, including descriptions and default values.
- Included a tip for users on providing verbose output when reporting bugs or support tickets to enhance troubleshooting.
* docs: clean up README files by removing trailing whitespace
- Removed unnecessary trailing whitespace from the README files for the `languages`, `login`, and `user` commands to improve formatting and maintain consistency across documentation.
- Ensured that all files end with a newline for better compatibility with various text editors.
* docs(components): add README files for components commands and update options
- Created detailed README files for the `components pull` and `components push` commands, outlining their usage, options, and examples for managing Storyblok components.
- Updated the main README to reference the new `components` module and its subcommands, enhancing clarity for developers.
- Adjusted option descriptions for consistency, including the removal of default values where applicable.
* docs(components): remove trailing whitespace from README files
- Cleaned up the README files for the `components`, `components pull`, and `components push` commands by removing unnecessary trailing whitespace to improve formatting and maintain consistency across documentation.
- Ensured all files end with a newline for better compatibility with various text editors.
* docs(migrations): add README files for migrations commands
- Created detailed README files for the `migrations`, `migrations generate`, and `migrations rollback` commands, outlining their usage, options, and examples for managing Storyblok component migrations.
- Updated the `migrations run` command documentation to include new options for publication modes and improved examples for clarity.
- Enhanced overall documentation structure to provide comprehensive guidance for developers interacting with the migrations functionality.
* docs: apply suggestions from code review
Co-authored-by: Jeremias Menichelli <jmenichelli@gmail.com>
* docs: update README files for improved clarity and structure
- Removed outdated documentation reference from the main README.
- Renamed the "Command Reference" section to "API" in the src README for better alignment with content.
- Enhanced the API section by adding a status legend to clarify the readiness of commands.
- Updated the description of the `languages` command to specify its functionality more accurately.
These changes aim to improve the overall documentation quality and user experience for developers interacting with the Storyblok CLI.
* docs: remove unnecessary blank line in README
- Eliminated an extra blank line in the main README to improve formatting and maintain consistency across documentation. This minor adjustment enhances readability for developers.
* docs: remove redundant login requirement note from multiple README files
- Eliminated the note stating "You must be logged in to use this command" from the README files of various commands, including `pull`, `push`, `languages`, `migrations`, and `user`. This change aims to streamline the documentation and reduce redundancy, as the login requirement is already implied in the context of command usage.
* feat(constants): update color palette for improved UI consistency
- Modified color values in the color palette to enhance visual appeal and maintain consistency across the application.
- Updated references in the index file to utilize the new color palette for better maintainability.
- Adjusted konsola utility to ensure consistent message formatting without altering the intended functionality.
* fix: update main entry point in package.json
- Changed the main entry point from `./dist/cli.mjs` to `./dist/index.mjs` for improved clarity and consistency in module exports.
- Updated the `bin` field to reflect the new entry point for the `storyblok` command.
* chore: remove pathe from externals
- Removed 'pathe' from the externals in build.config.ts to streamline the build process.
- Added 'pathe' as a dependency in package.json to ensure it is included in the project, improving module resolution and functionality.
* fix: update lock
* fix: streamline index.ts by removing chalk and enhancing konsola usage
- Removed the `chalk` dependency to simplify the code and improve performance.
- Updated the logging mechanism to utilize `konsola` for consistent message formatting.
- Added version output option to the program for better user feedback.
- Cleaned up the command error handling to enhance readability and maintainability.
* chore: capitalize help descriptions
* chore: add release-it configuration and update package scripts
- Introduced a new `.release-it.json` file to configure release-it for automated versioning and GitHub releases.
- Added a `release` script to `package.json` for easy release management.
- Updated the `test:ci` script to ensure it runs tests in the CI environment.
- Included `release-it` as a dependency in `package.json` to facilitate the release process.
* chore: update dependencies and devDependencies in package.json and pnpm-lock.yaml
- Upgraded "@inquirer/prompts" from version 7.5.0 to 7.5.1 for improved functionality.
- Updated various devDependencies including "@types/inquirer", "@types/node", "@vitest/coverage-v8", "@vitest/ui", "eslint", "memfs", "msw", and "release-it" to their latest versions for better performance and security.
- Adjusted "vite" and "vitest" versions to ensure compatibility with the latest features and fixes.
- Added "@release-it/conventional-changelog" as a new devDependency to facilitate conventional changelog generation.
- Updated lockfile to reflect the changes in dependencies and ensure consistency across environments.
* chore: release v4.0.0-beta.0
* docs: sync command important info
* docs: update README for clarity and accuracy
- Improved image alt text for better accessibility in the debugging section.
- Corrected issue submission link to point to the Storyblok CLI repository.
- Updated contribution documentation link to reflect the correct repository.
* docs: refine sync command description for clarity
- Improved the phrasing of the sync command's benefits for better readability and understanding.
* fix: adjust konsola breaks
* chore: release v4.0.0-beta.1
* chore: updated the package json detection and removed the stub env vars
* chore: update dev script in package.json to remove stub build
* fix: prevent infinite loop on push component
* chore: update .gitignore to include .DS_Store and remove it from the repository
* chore: add comment explaining unusual conditional
Co-authored-by: Alvaro Saburido <alvaro.saburido@gmail.com>
* chore: correct comment indentation for clarity in handleComponentGroups function
* fix: fetchComponent when shared name prefix or suffix (#198)
* fix: fetchComponent when common name prefix
* test: 422 responses when upserting components
* fix: finding matching preset when names aren't unique
* fix: 203-v4-languages-infinite-fetching-for-space-with-no-languages-in-the-list (#204)
* fix: call spinner.failed on warning
- Added a spinner failure indication when no languages are found.
- Updated the warning message format in the konsola utility for better readability.
* chore: enable sourcemaps for debugging
* tests: update warning message format in tests
* fix(login): improve region handling when login (#205)
* fix: skip region select if region flag is used
* tests: update tests messages
* chore: release v4.0.0-beta.2
* fix(generate): update path resolution and improve type extraction for Storyblok types (#208)
- Updated the path resolution for the Storyblok types file to use __dirname for better reliability.
- Simplified the type extraction process by directly using the content of the storyblokTypesContent instead of manually collecting type definitions.
- Ensured that the schema handling is more robust by adding a fallback for component.schema.
* fix(creds): get first credential to operate (#206)
* fix(creds): get first credential to operate
* fix(creds): update getCredentials to return empty object instead of null
- Modified the getCredentials function to return an empty object when the credentials file does not exist, improving type consistency.
- Updated related tests to reflect this change, ensuring that the expected output aligns with the new implementation.
- Introduced a utility function isEmptyObject to check for empty objects, enhancing code readability and maintainability.
* fix(creds): update getCredentials to return null for empty credentials
- Modified the getCredentials function to return null instead of an empty object when the credentials file is empty or does not exist, improving type consistency.
- Updated related tests to reflect this change, ensuring that the expected output aligns with the new implementation.
- Adjusted session handling to check for null credentials, enhancing the robustness of the session creation process.
* refactor(session): remove unused isEmptyObject import
- Removed the unused import of isEmptyObject from utils, streamlining the session.ts file and improving code clarity.
- This change does not affect the functionality of the session handling.
* fix(type): generate single and multi options fields types correctly (#210)
* fix(type): generate single and multi options fields types correctly
* refactor(types): correctly handle camelCase
* chore: release v4.0.0-beta.3
* fix(push): enhance error messages and add space option to readComponentsFiles (#212)
- Improved error messages in readComponentsFiles to provide clearer instructions for users when no local components are found for a specified space.
- Added a new optional `space` parameter to the ReadComponentsOptions interface to support better context in component operations.
- Updated related tests to ensure the new space parameter is correctly utilized and error messages are formatted with chalk for better readability.
* chore(deps): add @storyblok/js dependency version 4.0.0
- Included the @storyblok/js package in package.json to enhance Storyblok integration.
- Updated pnpm-lock.yaml to reflect the new dependency and its version.
* fix(type): import ISbStoryData from storyblok-js package (#218)
* fix(type): import ISbStoryData from storyblok-js package
- Added an import statement for the Storyblok type to the generated types file, enhancing type safety and ensuring proper type definitions are utilized in the generated output.
* fix(tests): enhance verification of generated Storyblok types in tests
- Updated the test for `generateStoryblokTypes` to verify the first three lines of the generated content, ensuring that the output includes the correct header comments and the import statement for `ISbStoryData`.
- This change improves the accuracy of the tests by checking specific content rather than relying on a regex match, enhancing maintainability and clarity.
* fix(error): refactor error handling to improve verbose logging (#219)
- Introduced a new `handleVerboseError` function to centralize and enhance the logging of different error types (CommandError, APIError, FileSystemError).
- Simplified the `handleError` function by delegating verbose error handling to the new function, improving code readability and maintainability.
- This change ensures that all error types are logged consistently and provides clearer information for debugging.
* fix(components): enhance circular dependency handling in resource fetching (#220)
* fix(components): enhance circular dependency handling in resource fetching
- Added a mechanism to track visited components during resource fetching to prevent circular dependencies.
- Updated the `findRelatedResources` function to filter out components that have already been visited, ensuring that only new components are processed.
- Improved error handling by skipping components that would create circular dependencies, enhancing the robustness of the component operations.
* fix(tests): update circular dependency handling tests for improved accuracy
- Mocked successful responses in the test for circular dependency handling to ensure accurate verification of component processing.
- Adjusted assertions to reflect that circular dependencies are now handled by skipping, resulting in no failures and confirming that only valid components are processed.
- This change enhances the robustness of the tests and ensures they align with the updated logic for handling circular dependencies.
* fix: add pagination control to custom-fetch and fetchStories method (#222)
* fix: add pagination control to custom-fetch and fetchStories method
* fix(stories): setting default per_page parameter to 100
* fix(tests): update fetchStories tests to include default per_page parameter in request URLs
* chore: release v4.0.0-beta.4
* fix: 193 rate limit issue with pullpush components (#224)
* feat: wip mapi client with retry mechanism
* feat: freeze mechanism for retry
* feat: wip concurrency limit
* refactor: replaced custom fetch with mapi client with retry mechanism for component internal tags
* refactor: replace customFetch with mapiClient on all component related operations
* refactor: simplify function signatures by removing unnecessary parameters in component handling functions
- Removed `password` and `region` parameters from `handleTags`, `handleComponentGroups`, `handleWhitelists`, and `upsertComponentPreset` functions, streamlining the function calls and improving clarity.
- Updated corresponding tests to reflect the changes in function signatures, ensuring consistency across the codebase.
* refactor(tests): remove unused mock variables in operations tests
- Eliminated `mockPassword` and `mockRegion` constants from `operations.test.ts` as they are no longer necessary, streamlining the test setup.
- Updated `operations.ts` to remove the import of `RegionCode`, reflecting the recent changes in function signatures and improving code clarity.
* chore: remove p-limit dependency from package.json and pnpm-lock.yaml
- Eliminated `p-limit` from `package.json` and corresponding entries in `pnpm-lock.yaml` to streamline dependencies and reduce package size.
* fix: make sure import for ISbStoryData is done in `storyblok-components.d.ts` (#226)
* fix: typecheck (#227)
* fix: add mapiclient initialization to migrations generate
* chore: add type checking script and refine TypeScript configuration
- Added a new script for type checking in package.json to ensure type safety during development.
- Updated tsconfig.json to include specific TypeScript file patterns and exclude test files, improving the clarity and efficiency of the TypeScript compilation process.
- Enhanced type safety in creds.ts by introducing a type guard for credential keys and ensuring proper checks before accessing credentials.
- Refined error handling in login actions by explicitly typing the error as FetchError for better clarity.
- Updated the loadCustomFieldsParser function to return undefined instead of null, aligning with TypeScript best practices for better type safety.
* refactor: rename and implement removeAllCredentials function
- Replaced the existing removeCredentials function with removeAllCredentials to improve clarity and functionality.
- Updated tests to reflect the new function name and ensure proper behavior when removing all credentials from the specified file.
- Enhanced the code structure by removing unnecessary logic related to specific region handling, streamlining the credential removal process.
* refactor: simplify credential handling in creds.ts
- Removed unnecessary imports and a type guard for credential keys to streamline the code.
- Enhanced clarity by focusing on the essential functionality of the getCredentials function.
- This change improves maintainability and reduces complexity in the credential management logic.
* feat: add signup command (#223)
* chore(utils): add requireAuthentication check for login
* chore: add signup command and tests
* fix(konsola): mock konsola for consistent test errors
* test: Remove unused imports in test files
* Update src/commands/components/pull/index.test.ts
* Update src/utils/auth.ts
* fix(tests): correct spelling in error messages for consistency
---------
Co-authored-by: Alvaro Saburido <alvaro.saburido@gmail.com>
* chore: release v4.0.0-beta.5
* docs: update Discord links in README.md to point to the new community invite
* docs: add signup command to README.md with link to Storyblok signup page
* fix: 211 kahn, tarjan algorithm for topological sort (#230)
* feat: wip mapi client with retry mechanism
* feat: freeze mechanism for retry
* feat: wip concurrency limit
* refactor: replaced custom fetch with mapi client with retry mechanism for component internal tags
* refactor: replace customFetch with mapiClient on all component related operations
* refactor: replace upserting logic with local saved target data and maps lookouts
* refactor: implement graph-based dependency resolution for push
* fix(progress-display): Adds centralized progress tracking and display
* refactor: add optional existingId for efficient upsert operations
* fix(dep-refs): update references after ID changes
* feat(graph-operations): add dependency graph and utils for processing
* refactor(graph-operations): Remove unused processed property
* refactor(graph): implement node classes with reference resolution
* refactor(graph): add preset nodes and dependencies to graph
* fix(resource-processing): handle circular deps via stubs
* chore: add minimatch dependency
* refactor(graph-operations): remove unused imports and code
* refactor(remove): delete obsolete test files
* refactor(utils): fix import of minimatch module
* refactor(comparison-utils): improve array normalization handling
* refactor(constants): add new color constants for groups, tags, and presets; update logging to use chalk for better readability
* refactor(push): use konsola ok
* refactor(progress-display): enhance progress tracking with elapsed time for events
* chore: temporarely log requests made
* fix(push): Remove unused force parameter from functions
* refactor(push): simplify space data filtering logic
* chore: remove deprecated graph-operations.ts file
* chore: update lock file
* refactor: enhance dependency collection for push components
* chore: disable max-statements-per-line rule in ESLint configuration
* fix(push): remove duplicate return statement in updateComponentGroup function
* refactor(dep-graph): add preset dependency handling and resolve preset IDs
---------
Co-authored-by: alvarosabu <alvaro.saburido@gmail.com>
* chore: release v4.0.0-rc.0
* chore: release v4.0.0
---------
Co-authored-by: Edoardo Dusi <edo@edoardodusi.com>
Co-authored-by: Angelika Cathor <angelika.cathor@storyblok.com>
Co-authored-by: Jeremias Menichelli <jmenichelli@gmail.com>
Co-authored-by: Imran Sulemanji <imran.sulemanji@gmail.com>
Co-authored-by: Angelika Cathor <angelikacathor@fastmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.